use dioxus::html::style;
// import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types
use dioxus::prelude::*;

fn app(cx: Scope) -> Element {
    let mut count = use_state(cx, || 0);

    cx.render(rsx! {
        style {
           include_str!("style.css")
        }
        div{
            h1 { "High-Five counter: {count}" }
            button { onclick: move |_| count += 1, "Up high!" }
            button { onclick: move |_| count -= 1, "Down low!" }
        }

    })
}

fn main() {
    dioxus_desktop::launch(app);
    // MainWindow::new().unwrap().run().unwrap();
}
